/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.chain.presenter;

import br.com.view.TelaInicializacaoView;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import br.com.view.TelaPrincipalView;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Bush
 */
public class CompiladorPascalMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
        TelaInicializacaoView view = new TelaInicializacaoView();
        view.setLocationRelativeTo(view);
        view.setVisible(true);
        try {
//            view.getCarregando().setMaximum(100);
//            Thread.sleep(1000);
//            view.getCarregando().setValue(25);
//            Thread.sleep(1000);
//            view.getCarregando().setValue(57);
//            Thread.sleep(1000);
//            view.getCarregando().setValue(85);
//            Thread.sleep(1000);
//            view.getCarregando().setValue(99);
            Thread.sleep(1000);
            view.getCarregando().setValue(100);
            view.dispose();
            new TelaPrincipalPresenter();
        } catch (InterruptedException ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }

    }

}
